package week_02.shuffle_deck.normal;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;

public class normal {
    public static void main(String[] args) {
        double random=(Math.random()*10);
        int r=(int)random;
        Integer[] a=new Integer[26+r];
        Integer[] b=new Integer[26-r];
        //生成一个1-3的随机数
        for (int i=0;i<26+r;i++){
            a[i]=i+1;
        }
        for (int i=0;i<26-r;i++){
            b[i]=i+27+r;
        }
        ArrayList<Integer> cardF=new ArrayList<>();
        ArrayList<Integer> cardA=new ArrayList<>();
        ArrayList<Integer> cards=new ArrayList<>();
        cardF.addAll(Arrays.asList(a));
        cardF.sort(Comparator.reverseOrder());
        cardA.addAll(Arrays.asList(b));
        for (int i=0;i<26-r;i++){
            cards.add(cardF.get(i));
            cards.add(cardA.get(i));
        }
        for (int i=26-r;i<cardF.size();i++){
            cards.add(cardF.get(i));
        }
//        System.out.println(cardF);
//        System.out.println(cardA);
        System.out.println(cards);
        System.out.println(r);
    }
}
